//
//  EMError+Helper.swift
//  SitPosition
//
//  Created by apple on 2019/2/8.
//  Copyright © 2019 apple. All rights reserved.
//

import Foundation


extension EMError {
    
    var localizedDescription: String {
        switch code {
        case EMErrorUserNotFound:
            return Strings.imeUserNotExists
        case EMErrorNetworkUnavailable:
            return Strings.imeNetworkUnavailable
        case EMErrorServerNotReachable:
            return Strings.imeServerNotReachable
        case EMErrorUserAuthenticationFailed:
            return Strings.imeAuthenticationFailed
        case EMErrorServerTimeout:
            return Strings.imeServerTimeout
        case EMErrorServerServingForbidden:
            return Strings.imeServerServingForbidden
        case EMErrorUserLoginTooManyDevices:
            return Strings.imeUserLoginTooManyDevices
        default:
            return Strings.imeUnknown
        }
    }
}
